package com.jianganming.state.login;

public class UnLoginState extends UserState {
    @Override
    public void favorite() {
        toLogin();
        context.getState().favorite();
    }

    @Override
    public void comment(String comment) {
        toLogin();
        context.getState().comment(comment);
    }

    private void toLogin(){
        System.out.println("跳转到登录页！");
        context.setState(AppContext.STATE_LOGIN);

    }
}
